{% extends 'maintemplate.html' %}
{% load hakaze_filters %}

{% block contents %}
<h1>{{ pagetitle }}</h1>
<br/>

<div>
  {% if page.contents %}
   {{ page.contents|hakazefy:"" }}
  {% else %}
   <a href="{% url hakaze.wiki.views.wikipage pagetitle %}?edit=1">Create This Page</a>
  {% endif %}
</div>
<br/>
{% if user.is_authenticated %}
      <a href="{% url hakaze.wiki.views.wikipage pagetitle %}?edit=1">Edit This Page</a>
{% endif %}
<br/>
{% if wikiform %}
<form method="post" action=".">
{{ wikiform.contents.label }}<br/>
{{ wikiform.contents }}<br/>
<input name="submit" type="submit" value="Submit"/>
<input name="submit" type="submit" value="Preview"/>
</form>
{% endif %}

{% endblock contents %}
